// 导入axios实例
import { get, post, put, del } from '../utils/request';

// 应用相关API服务
export const applicationService = {
  // 获取应用列表
  getApplications: (params) => {
    return get('/api/applications', params);
  },
  
  // 获取单个应用详情
  getApplicationById: (id) => {
    return get(`/api/applications/${id}`);
  },
  
  // 创建新应用
  createApplication: (applicationData) => {
    return post('/api/applications', applicationData);
  },
  
  // 更新应用信息
  updateApplication: (id, applicationData) => {
    return put(`/api/applications/${id}`, applicationData);
  },
  
  // 删除应用
  deleteApplication: (id) => {
    return del(`/api/applications/${id}`);
  }
};

export default applicationService;